package com.skp.shaphan.ui.windows;

import java.awt.Container;

import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

import com.skp.lydia.layout.CSSLayout;
import com.skp.shaphan.ui.buttons.DialogCancelButton;
import com.skp.shaphan.ui.buttons.ImportSQLOkButton;
import com.skp.shaphan.ui.buttons.ImportSQLSearchButton;

public class ImportSQLWindow extends JDialog {

	public ImportSQLWindow(JFrame parent) {
		super(parent, "Import SQL");
		setSize(300, 300);
		Container cp = getContentPane();
		cp.setLayout(new CSSLayout());
		
		JLabel label = new JLabel("Type:");
		cp.add(label, "left-margin: 5; top-margin: 5");
		
		JComboBox sqlType = new JComboBox(new String[]{"App Engine SQL", "Record SQL"});
		cp.add(sqlType, "display: inline; left-margin: 5; top-margin: 5");
		
		label = new JLabel("App Engine Name:");
		cp.add(label, "left-margin: 5; top-margin: 5");
		JTextField aeName = new JTextField(15);
		cp.add(aeName, "display: inline; left-margin: 5; top-margin: 5");
		
		label = new JLabel("Record Name:");
		cp.add(label, "left-margin: 5; top-margin: 5");
		JTextField recName = new JTextField(15);
		cp.add(recName, "display: inline; left-margin: 5; top-margin: 5");

		ImportSQLSearchButton search = new ImportSQLSearchButton();
		cp.add(search, "left-margin: 5; top-margin: 5");
		
		DialogCancelButton cancel = new DialogCancelButton(this);
		cp.add(cancel, "left-margin: 5; top-margin: 5");
		ImportSQLOkButton ok = new ImportSQLOkButton();
		cp.add(ok, "display: inline; left-margin: 5; top-margin: 5");
	}
}
